
function task_search(){
	var search_words=$("#input_task_search").val();
	if(search_words==''){
		layer.msg('不能搜索一个空内容！',{time: 2000});
		return;
	}
	$.post("/index.php/task/search_by_text/", 
			{
				search_words:search_words,
                team:teamid
			},
			function(result) { 
				if(result.status=='success'){
					$("#search_view div.task").remove();
					$.each(result.data,function(idx,item){ 
						$("#search_view").append(new_task(item));
					}); 
					$("#btn_expend_all_searched_task").show();
				}else{
					layer.msg(result.message,{time: 2000});
				}
			}
		,"json");
}

function clear_search()
{
	$("#search_view div.task").remove();
	$("#input_task_search").val('');
	$("#btn_expend_all_searched_task").hide();
}


function expend_all_searched_task(){
	$.each($("#search_view>div.task"),function(idx,item){
		$('div.task[data-taskid="'+$(item).attr("data-taskid")+'"]').show().parents().show();
	})
	
}